/* eslint-disable no-empty */
export default {
  get: function(key) {
    try {
      return JSON.parse(localStorage.getItem(key))
    } catch (_error) {}
  },
  set: function(key, value) {
    try {
      localStorage.setItem(key, JSON.stringify(value))
      return true
    } catch (_error) {}
  },
  del: function(key) {
    try {
      localStorage.removeItem(key)
      return true
    } catch (_error) {}
  },
  reset: function() {
    try {
      localStorage.clear()
      return true
    } catch (_error) {}
  }
}
